import * as proxy from '@/constants/proxy'
import request from '@/utils/request'
import { exportMethod } from '@/utils/utils'

//创新人才团队
// 列表数据
export function getInnovativeTalentTeamList(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/InnovativeTalentTeam/list',
    method: 'post',
    data,
  })
}
//根据id获取详情
export function getInnovativeTalentTeamDetail(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/InnovativeTalentTeam/getDetailById/${id}`,
    method: 'get',
  })
}
//新增
export function getAddInnovativeTalentTeam(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/InnovativeTalentTeam/add',
    method: 'post',
    data,
  })
}
//删除
export function deleteInnovativeTalentTeam(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/InnovativeTalentTeam/${id}`,
    method: 'delete',
  })
}
//新增文件
export function getAddFileInnovativeTalentTeam(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/InnovativeTalentTeam/addFile',
    method: 'post',
    data,
  })
}
//导出
export function getExportInnovativeTalentTeam(data: any) {
  const params = {
    method: 'post',
    url: proxy.CHECC_API_CMS + '/kjsl/InnovativeTalentTeam/export',
    data: data,
  }
  return exportMethod(params)
}

//新增成员
export function getAddMemberInnovativeTalentTeam(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/InnovativeTalentTeam/addMember',
    method: 'post',
    data,
  })
}

//取消关联
export function getProjectInnovativeTalentTeam(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/InnovativeTalentTeam/disAssociation/project/${id}`,
    method: 'get',
  })
}

//修改
export function getUpdateInnovativeTalentTeam(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/InnovativeTalentTeam/update',
    method: 'post',
    data,
  })
}

//锁定
export function getInnovativeTalentTeamLock(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/InnovativeTalentTeam/lock/${id}`,
    method: 'get',
  })
}

//解锁
export function getInnovativeTalentTeamUnlock(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/InnovativeTalentTeam/unlock/${id}`,
    method: 'get',
  })
}

//确认
export function getInnovativeTalentTeamConfirm(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/InnovativeTalentTeam/confirm/${id}`,
    method: 'get',
  })
}

//科技领军人才
// 列表数据
export function getinnovativeTechHeadTeamList(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/innovativeTechHeadTeam/list',
    method: 'post',
    data,
  })
}
//根据id获取详情
export function getinnovativeTechHeadTeamDetail(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/innovativeTechHeadTeam/getDetailById/${id}`,
    method: 'get',
  })
}
//新增
export function getAddinnovativeTechHeadTeam(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/innovativeTechHeadTeam/add',
    method: 'post',
    data,
  })
}
//删除
export function deleteinnovativeTechHeadTeam(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/innovativeTechHeadTeam/${id}`,
    method: 'delete',
  })
}
//新增文件
export function getAddFileinnovativeTechHeadTeam(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/innovativeTechHeadTeam/addFile',
    method: 'post',
    data,
  })
}
//导出
export function getExportinnovativeTechHeadTeam(data: any) {
  const params = {
    method: 'post',
    url: proxy.CHECC_API_CMS + '/kjsl/innovativeTechHeadTeam/export',
    data: data,
  }
  return exportMethod(params)
}
//修改
export function getUpdateIinnovativeTechHeadTeam(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + '/kjsl/innovativeTechHeadTeam/update',
    method: 'post',
    data,
  })
}

//锁定
export function getInnovativeTechHeadTeamLock(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/innovativeTechHeadTeam/lock/${id}`,
    method: 'get',
  })
}

//解锁
export function getInnovativeTechHeadTeamUnlock(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/innovativeTechHeadTeam/unlock/${id}`,
    method: 'get',
  })
}

//确认
export function getInnovativeTechHeadTeamConfirm(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/innovativeTechHeadTeam/confirm/${id}`,
    method: 'get',
  })
}
